package com.gcu.common.web.exception;

import com.gcu.common.base.result.ISysResultCode;
import lombok.Getter;

/**
 * @ system:Mac
 * @ author:lin tingfeng
 * @ data:2023/9/20 14:43
 * @ package_name:com.gcu.common.web.exception
 * @ project_name:SpringCloud-Oauth2
 * @ desc: 自定义异常类
 */
@Getter
public class BizException extends RuntimeException {

    public ISysResultCode sysResultCode;

    public BizException(ISysResultCode sysResultCode) {
        super(sysResultCode.getMsg());
        this.sysResultCode = sysResultCode;
    }

    public BizException(String message) {
        super(message);
    }

    public BizException(Throwable cause, String message) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }
}
